package UILayer;

import javax.swing.JPanel;
import javax.swing.border.LineBorder;

import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.border.TitledBorder;
import javax.swing.JOptionPane;
import javax.swing.JTextField;
import javax.swing.JLabel;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JTable;
import javax.swing.border.EmptyBorder;

public class KundeSalgPanel extends JPanel {
	private JTextField textField;
	private JTextField textField_1;
	private JTextField textField_2;
	private JTextField textField_3;
	private JTextField textField_4;
	private JTextField textField_5;
	private JTextField textField_6;
	private JTable table;
	
	private JPanel panel;
	private JPanel panel_1;
	
	private JLabel label;
	private JLabel label_1;
	private JLabel label_2;
	private JLabel label_3;
	private JLabel label_4;
	
	private JButton button;
	private JButton button_1;
	private JPanel panel_2;
	private JButton button_2;
	private JLabel label_5;
	private JLabel label_6;
	private JLabel label_7;
	private JCheckBox checkBox;
	private JCheckBox checkBox_1;
	private JButton button_4;
	private JLabel lblError;
	private JPanel panel_3;
	

	/**
	 * Create the panel.
	 */
	public KundeSalgPanel() {
		setBorder(new LineBorder(new Color(0, 0, 0)));
		setLayout(null);
		
		panel = new JPanel();
		panel.setLayout(null);
		panel.setBorder(new TitledBorder(new LineBorder(new Color(0, 0, 0)), "Evt. Rabat", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel.setBounds(10, 11, 247, 97);
		add(panel);
		
		textField = new JTextField();
		textField.setColumns(10);
		textField.setBounds(10, 51, 86, 20);
		panel.add(textField);
		
		label = new JLabel("Rabat");
		label.setBounds(10, 26, 46, 14);
		panel.add(label);
		
		label_1 = new JLabel("%");
		label_1.setBounds(106, 54, 46, 14);
		panel.add(label_1);
		
		button = new JButton("RABAT");
		button.setBounds(148, 50, 89, 23);
		panel.add(button);
		
		panel_1 = new JPanel();
		panel_1.setLayout(null);
		panel_1.setBorder(new TitledBorder(new LineBorder(new Color(0, 0, 0)), "Manuel indtastning", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_1.setBounds(10, 119, 247, 219);
		add(panel_1);
		
		textField_1 = new JTextField();
		textField_1.setColumns(10);
		textField_1.setBounds(10, 67, 86, 20);
		panel_1.add(textField_1);
		
		label_2 = new JLabel("Varer nr.");
		label_2.setBounds(10, 45, 49, 14);
		panel_1.add(label_2);
		
		textField_2 = new JTextField();
		textField_2.setColumns(10);
		textField_2.setBounds(10, 118, 86, 20);
		panel_1.add(textField_2);
		
		label_3 = new JLabel("Produkt gruppe");
		label_3.setBounds(10, 98, 86, 14);
		panel_1.add(label_3);
		
		textField_3 = new JTextField();
		textField_3.setColumns(10);
		textField_3.setBounds(10, 167, 86, 20);
		panel_1.add(textField_3);
		
		label_4 = new JLabel("Antal");
		label_4.setBounds(10, 149, 49, 14);
		panel_1.add(label_4);
		
		button_1 = new JButton("Tilf\u00F8j");
		button_1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				manualAddProduct();
			}
		});
		button_1.setBounds(148, 166, 89, 23);
		panel_1.add(button_1);
		
		panel_2 = new JPanel();
		panel_2.setLayout(null);
		panel_2.setBorder(new TitledBorder(new LineBorder(new Color(0, 0, 0)), "Betaling", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_2.setBounds(10, 349, 634, 131);
		add(panel_2);
		
		button_2 = new JButton("Find kunde");
		button_2.setBounds(10, 21, 101, 23);
		panel_2.add(button_2);
		
		textField_4 = new JTextField();
		textField_4.setColumns(10);
		textField_4.setBounds(228, 22, 86, 20);
		panel_2.add(textField_4);
		
		textField_5 = new JTextField();
		textField_5.setColumns(10);
		textField_5.setBounds(228, 56, 86, 20);
		panel_2.add(textField_5);
		
		textField_6 = new JTextField();
		textField_6.setColumns(10);
		textField_6.setBounds(228, 87, 86, 20);
		panel_2.add(textField_6);
		
		label_5 = new JLabel("Navn");
		label_5.setBounds(169, 25, 49, 14);
		panel_2.add(label_5);
		
		label_6 = new JLabel("Telefon");
		label_6.setBounds(169, 59, 49, 14);
		panel_2.add(label_6);
		
		label_7 = new JLabel("Kunde nr.");
		label_7.setBounds(169, 90, 49, 14);
		panel_2.add(label_7);
		
		checkBox = new JCheckBox("Kredit");
		checkBox.setBounds(342, 56, 97, 23);
		panel_2.add(checkBox);
		
		checkBox_1 = new JCheckBox("Kontant");
		checkBox_1.setBounds(342, 86, 97, 23);
		panel_2.add(checkBox_1);
		
		button_4 = new JButton("Afslut salg");
		button_4.setBounds(521, 86, 89, 23);
		panel_2.add(button_4);
		
		lblError = new JLabel("");
		lblError.setBounds(10, 55, 46, 14);
		panel_2.add(lblError);
		
		panel_3 = new JPanel();
		panel_3.setLayout(null);
		panel_3.setBorder(new TitledBorder(new LineBorder(new Color(0, 0, 0)), "Varer liste", TitledBorder.LEADING, TitledBorder.TOP, null, null));
		panel_3.setBounds(267, 11, 379, 327);
		add(panel_3);
		
		table = new JTable();
		table.setColumnSelectionAllowed(true);
		table.setCellSelectionEnabled(true);
		table.setBounds(10, 43, 359, 273);
		panel_3.add(table);

	}
	
	private void manualAddProduct()
	{
		
	}

}
